﻿<%@ Page Language="C#" MasterPageFile="~/Master.Master" AutoEventWireup="true" CodeBehind="TR_CompetencyTypes.aspx.cs" Inherits="KPIS.GERP.GHRMS.APP.App_UI.Forms.TR_CompetencyTypes" %>

<%@ Register Src="../Controls/user.ascx" TagName="user" TagPrefix="uc1" %>
<asp:Content ID="ContentTRCompetencyTypes" runat="server" contentplaceholderid="ContentPlaceHolder1">
<link href="../../Styles/CssClass.css" rel="stylesheet" type="text/css" />
<telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">        
            <script type="text/javascript">
                function onTextChange(sender) {
                    if (sender.get_value() == "") {
                        sender.set_text("");
                    }
                }
                                
            </script>       
</telerik:RadCodeBlock>

    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="TRCompetencyTypes">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="TRCompetencyTypes" LoadingPanelID="RadWindowManager1" />
                    </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>    
   
    <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" BackgroundPosition="None" Skin="Outlook">
    </telerik:RadAjaxLoadingPanel>

    <asp:Panel ID="TRCompetencyTypes" runat="server">
        <table width="1000" cellpadding="0" cellspacing="0">
            <tr> 
                <td valign="top">
                    <uc1:user ID="user1" runat="server" />
                </td>
            </tr>
            <tr>
                <td colspan="3">
                    <div class="moduleDivSlim1000x450">  
                    <div class="moduleDivBottom1000">
                       <table align="center" width="980px">
                        <tr>
                            <td align="left" class="tableHeader">
                                ประเภทสมรรถนะ
                            </td>
                        </tr>
                       </table>
                        
                       <table align="center" width="980px" style="height:300px" >
                        <tr>
                            <td>                                                                  
                                <asp:Panel ID="tblTRCompetencyTypes" 
                                    runat="server" 
                                    align="center" 
                                    Height="390px" 
                                    Visible="true"
                                    ScrollBars="Auto" 
                                    Width="980px">                                                                                                                                      
                                    <telerik:RadGrid ID="grdTRCompetencyTypes" 
                                        runat="server" align="center" 
                                        AllowAutomaticDeletes="True" 
                                        AllowFilteringByColumn="True" 
                                        AllowMultiRowEdit="True" 
                                        AllowMultiRowSelection="True" 
                                        AllowPaging="True" 
                                        AllowSorting="True" 
                                        AutoGenerateColumns="False" 
                                        EnableAJAX="True" 
                                        EnableAJAXLoadingTemplate="True"
                                        GridLines="None" 
                                        Height="380px"
                                        Width="965px" 
                                        Skin="Outlook"
                                        OnItemCommand="grdTRCompetencyTypes_ItemCommand"
                                        OnItemDataBound="grdTRCompetencyTypes_ItemDataBound">                                                                                                                                                                                                    
                                        <MasterTableView 
                                            AllowMultiColumnSorting="True" 
                                            CellSpacing="-1" 
                                            ClientDataKeyNames="competency_type_seq" 
                                            CommandItemDisplay="Top"                                                         
                                            DataKeyNames="competency_type_seq"                                                    
                                            NoMasterRecordsText="&lt; ไม่มีข้อมูล &gt;">
                                            <CommandItemTemplate>
                                                <table width="100%">
                                                <tr>
                                                    <td align="left">
                                                        <asp:LinkButton ID="cmdAddCompetencyTypes" 
                                                            runat="server"                                                                     
                                                            CommandName="cmdAddCompetencyTypes"
                                                            OnClick="cmdAddCompetencyTypes_Click"                                                                    
                                                            Visible="true">
                                                            <img style="border:0px;vertical-align:middle;" alt="" 
                                                            src="../Images/Buttons/AddRecord.gif" /> เพิ่มข้อมูลประเภทสมรรถนะ
                                                        </asp:LinkButton>
                                                    </td>
                                                    <td align="right">
                                                        
                                                    </td>
                                                </tr>
                                                </table>
                                            </CommandItemTemplate>                                                    
                                            <Columns>                                                      
                                                <telerik:GridTemplateColumn  
                                                    HeaderStyle-Width="20px"                                                             
                                                    HeaderStyle-HorizontalAlign="Center"> 
                                                    <FilterTemplate></FilterTemplate>
                                                    <ItemTemplate>
                                                        <table>
                                                            <asp:ImageButton 
                                                                ID="cmdEdit" 
                                                                runat="server" 
                                                                CommandName="DataEdit"
                                                                ImageUrl="../Images/Buttons/Edit.gif" 
                                                                ToolTip="แก้ไขรายการ" 
                                                                width="20px" />
                                                        </table>
                                                    </ItemTemplate>
                                                </telerik:GridTemplateColumn> 
                                                <telerik:GridTemplateColumn  
                                                    HeaderStyle-Width="20px"                                                             
                                                    HeaderStyle-HorizontalAlign="Center"> 
                                                    <FilterTemplate></FilterTemplate>
                                                    <ItemTemplate>
                                                        <table>
                                                            <asp:ImageButton 
                                                                ID="cmdDelete" 
                                                                runat="server" 
                                                                CommandName="Delete"
                                                                ImageUrl="../Images/Buttons/Delete.gif" 
                                                                ToolTip="ลบรายการ" 
                                                                width="20px" />
                                                        </table>
                                                    </ItemTemplate>
                                                </telerik:GridTemplateColumn>                                               
                                                <telerik:GridBoundColumn 
                                                    AutoPostBackOnFilter="true" 
                                                    CurrentFilterFunction="Contains" 
                                                    DataField="competency_type_seq" 
                                                    FilterControlWidth="100%" 
                                                    HeaderText="รหัส" 
                                                    ShowFilterIcon="false" 
                                                    UniqueName="competency_type_seq">
                                                    <HeaderStyle HorizontalAlign="Center" Width="80px" />
                                                    <ItemStyle HorizontalAlign="Center" />
                                                </telerik:GridBoundColumn>
                                                <telerik:GridBoundColumn 
                                                    AutoPostBackOnFilter="true" 
                                                    CurrentFilterFunction="Contains" 
                                                    DataField="competency_type_descr" 
                                                    FilterControlWidth="100%" 
                                                    HeaderText="ประเภทสมรรถนะ " 
                                                    ShowFilterIcon="false" 
                                                    UniqueName="competency_type_descr"> 
                                                    <HeaderStyle HorizontalAlign="Center" />                                                          
                                                    <ItemStyle HorizontalAlign="Center" />
                                                    <%--DataFormatString="{0:d}" Format แสดงวันของ String Datetime--%>
                                                </telerik:GridBoundColumn>                                                        
                                            </Columns>
                                            <PagerStyle 
                                                AlwaysVisible="true" 
                                                FirstPageToolTip="กลับหน้าแรก" 
                                                LastPageToolTip="ไปหน้าสุดท้าย" 
                                                Mode="NumericPages" 
                                                NextPagesToolTip="หน้าถัดไป" 
                                                NextPageToolTip="หน้าถัดไป" 
                                                PrevPagesToolTip="ย้อนกลับ" 
                                                PrevPageToolTip="ย้อนกลับ" />
                                        </MasterTableView>
                                        <ClientSettings>
                                            <Selecting AllowRowSelect="true" />
                                            <Scrolling AllowScroll="true" UseStaticHeaders="True" />
                                        </ClientSettings>
                                    </telerik:RadGrid>
                                </asp:Panel>
                                <asp:Panel ID="CompetencyTypesEdit" 
                                    runat="server"
                                    Visible="false" 
                                    Height="380px" 
                                    width="980px" 
                                    align="center">
                                    <ul class="formList">
                                         <li>
                                            <table width="980px" align="center" >
                                                <tr>
                                                    <td align="left" class="tableDetailHeader" style="width: 980px">
                                                        ข้อมูลประเภทสมรรถนะ
                                                    </td>
                                                </tr>
                                            </table>
                                        </li>
                                        <li>
                                            <table  width="980px">
                                            <tr>
                                                <td align="right" width="150px">
                                                        รหัส :
                                                </td>
                                                <td align="left">
                                                    <telerik:RadTextBox ID="txtCompetencyTypeSeq" runat="server" Width="150px"/>
                                                    <span class="span">*</span>
                                                </td>
                                            </tr>                                                
                                            </table>
                                        </li>
                                        <li>
                                            <table width="980px">
                                            <tr>
                                                <td align="right" width="150px">
                                                     ประเภทสมรรถนะ :
                                                </td>
                                                <td align="left">
                                                    <telerik:RadTextBox ID="txtCompetencyTypeDescr" runat="server" Width="400px" />                                                            
                                                    <span class="span">*</span>
                                                </td>
                                            </tr>
                                            </table>
                                        </li>                                                
                                    </ul>
                                      <table width= "750">
                                        <tr>
                                        <td align="right">
                                            <asp:Button ID="btnSave" onclick="btnSave_Click" runat="server" CssClass="button" Text="บันทึก" Width="80px" />                            
                                        </td>
                                        <td align="left">
                                            <asp:Button ID="btnCancel" OnClick="btnCancel_Click" runat="server" CssClass="button" Text="ยกเลิก" Width="80px" />
                                        </td>
                                        </tr>
                                    </table>
                                </asp:Panel>   
                            </td>
                        </tr>
                        </table>
                    </div>
                    </div>
                </td>
            </tr>
        </table>
    </asp:Panel>
</asp:Content>
